$(document).ready(function(){
	$('#getZuieai').click(function(){
		var url = $('#iptEditor').val();
		if (url == '') {
			$('#iptEditor').val('Input zuieai.com url here');
			setTimeout(function(){$('#iptEditor').val('')}, 2000);
			return false;
		}
		$('#urlCode').val('opening:' + url);
		$.get('get_url.php?site=zuieai&ran=' + new Date().getTime() + '&url=' + url, function(data){
//			$('#urlCode').val(data);
			$('#relList').html(data);
		});
	})
});

function play(url) {
	$('#player').html(wmplayer(url, 360,300,1));
}

function wmplayer(sUrl,nWidth,nHeight,bAutostart){
	var sPlayer = '<object classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" width="' + nWidth + '" height="' + nHeight + '" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701">';
	sPlayer += '<param name="url" value="' + sUrl + '" />';
	sPlayer += '<param name="autostart" value="' + (bAutostart ? 1 : 0) + '">';
	sPlayer += '<param name="EnableContextMenu" value="0">';
	sPlayer += '<object>';
	return sPlayer;
}